import client from './client/paymentClient'

// 付款申请单查询
const getPaymentApplicationFormQueryData = async (params) => {
  // TODO get请求测试mock的get 传参拦截
  const result = await client.getAsync({
    url: '/getPaymentApplicationFormQueryData',
    params
  });
  return result
}
// 下载付款资料
const getDownPaymentFile = async (params) => {
  const result = await client.postAsync({
    url: '/getDownPaymentFile', 
    params
  });
  return result
}

// 导出
const getExportFile = async (params) => {
  const result = await client.postAsync({
    url: '/exportFile', 
    params
  });
  return result
}

// 付款申请单详情
const getPaymentApplicationFormInfo = async (params) => {
  const result = await client.postAsync({
    url: '/paymentApplicationFormInfo', 
    params
  });
  return result
}

// 提交
const submitPaymentApplicationFormData = async (params) => {
  const result = await client.postAsync({
    url: '/submitPaymentApplicationFormData', 
    params
  })
  return result;
}

// 查看PDF
const getPaymentViewPDF = async (params) => {
  const result = await client.postAsync({
    url: '/getPaymentViewPDF', 
    params
  })
  return result
}

// 支付
const paymentApplicationForm = async (params) => {
  const result = await client.postAsync({
    url: '/paymentApplicationForm', 
    params
  });
  return result
}

// 银企直连-提交
const submitBankCompany = async(params) => {
  const result = await client.postAsync({
    url: '/submitBankCompany', 
    params
  })
  return result
}

export { 
  getPaymentApplicationFormQueryData, 
  getDownPaymentFile, 
  getExportFile,
  getPaymentApplicationFormInfo,
  submitPaymentApplicationFormData,
  getPaymentViewPDF,
  paymentApplicationForm,
  submitBankCompany,
}
